package com.xiaofengwx.remind.data;

public class MyChineseDate {
	public int iCycle;
	public int iYear;
	public int iMonth;
	public boolean iLeapMonth;
	public int iDay;

	public MyChineseDate() {
		this(0, 0, 0, false, 0);
	}
	
	public MyChineseDate(int cycle, int year, int month, boolean leap, int day) {
		iCycle = cycle;
		iYear = year;
		iMonth = month;
		iLeapMonth = leap;
		iDay = day;
	}

	public static int[] mallocArray() {
		return new int[5];
	}

	public void init(int[] array) {
		iCycle = array[0];
		iYear = array[1];
		iMonth = array[2];
		iLeapMonth = array[3] != 0;
		iDay = array[4];
	}

	public void export_(int[] array) {
		array[0] = iCycle;
		array[1] = iYear;
		array[2] = iMonth;
		array[3] = iLeapMonth ? 1 : 0;
		array[4] = iDay;
	}
}
